#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <pthread.h>
void sys_error(const char *msg)
{
    perror(msg);
    exit(1);
}
void sig_catch(int sign)
{
    printf("catch %d\n", sign);
    return;
}
int main(int argc, char const *argv[])
{
    signal(SIGINT, sig_catch);
    while (1)
        ;
    return 0;
}
//ctrl+z退出